package com.qf.erpb.login.controller;
import com.qf.erpb.core.common.JsonResult;
import com.qf.erpb.login.entity.Admin;
import com.qf.erpb.login.service.AdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (Admin)表控制层
 *
 * @author makejava
 * @since 2023-12-18 16:09:36
 */
@RestController
@RequestMapping("/admin")
@Api(tags = "登录接口")
public class    AdminController {
    @Resource
    private AdminService adminService;

    @ApiOperation("登录")
    @PostMapping("/login")
    public JsonResult login(@RequestBody Admin param){
        String login = adminService.login(param);
        return JsonResult.ok(param);
    }

    @ApiOperation("退出数据接口")
    @PostMapping("/logout")
    public JsonResult logout() {
        return JsonResult.ok(200);
    }

}

